package com.jetpack_sunflower.viewmodels

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.jetpack_sunflower.data.PlantRespository

class PlantListViewModelFactory(private val plantRespository: PlantRespository) : ViewModelProvider.NewInstanceFactory() {
    @Suppress("UNCHECKED_CAST")
    override fun <T : ViewModel?> create(modelClass: Class<T>): T {
        return PlantListViewModel(plantRespository) as T
    }
}